<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #demo{
            margin: 0 auto;
            width: 800px;
            height: 600px;
        }
        #demo>#img{
            margin: 0 auto;
            width: 90%;
            height: 90%;
            border: solid 1px green;
            text-align: center;
            position: relative;
        }
        #demo>#img>img{
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
        }
        #demo>#img>div{
            bottom: 0;
            position: absolute;
            z-index: 2;
            width: 100%;
            text-align: center;
            color: aliceblue;
            padding: 10px 0px;
        }
        #demo>#img>div:hover{
            bottom: 0;
            position: absolute;
            z-index: 2;
            width: 100%;
            text-align: center;
            color: aliceblue;
            background-color: rgba(202, 133, 133, 0.5);
            padding: 10px 0px;
        }
    </style>
</head>
<body>
    <div id="demo">
        <div id="img">
            <img src="../img/R-C.jpg" alt="">
            <div>三星将面临关闭工厂风波</div>
        </div>
    </div>
</body>
</html>